package com.oop;

public class Test4 {
    public static void main(String[] args) {
        B b = new B();
        int[]arr={1,2,3};
        System.out.print("交换前：");
        b.print(arr);
        b.test11(arr);
        System.out.print("交换后：");
        b.print(arr);
    }
}

class B{
    public void test11(int[]arr){
        arr[0]=666;
        arr[1]=777;
    }
    public void print(int[]arr){
        for(int i=0;i<arr.length;i++){
            System.out.print(arr[i]+" ");
        }
        System.out.println();
    }
}